#ifndef _SHAPES_H_
#define _SHAPES_H_

#ifdef __APPLE__
#define glGenVertexArrays glGenVertexArraysAPPLE
#define glBindVertexArray glBindVertexArrayAPPLE
#endif

#include "Angel.h"

struct ShapeData
{
    GLuint vao;
    int numVertices;
};

void setVertexAttrib(GLuint program, 
                     GLfloat* points,    GLsizeiptr psize, 
                     GLfloat* normals,   GLsizeiptr nsize,
                     GLfloat* texcoords, GLsizeiptr tsize);

void setVertexAttrib_axis(GLuint program, 
                          GLfloat* points,    GLsizeiptr psize, 
                          GLfloat* colors,    GLsizeiptr csize);


void generateCube(GLuint program, ShapeData* cubeData);
void generateSphere(GLuint program, ShapeData* sphereData);
void generateEllipsoid(GLuint program, ShapeData* ellipsoidData, const vec3 &scale);
void generateCone(GLuint program, ShapeData* coneData);
void generateCylinder(GLuint program, ShapeData* cylData);

#endif